<?php $this->pageTitle = 'Export ' . $type; ?>
<?php Yii::app()->clientScript->registerScriptFile('/js/jquery.cookie/jquery.cookie.js'); ?>
<?php
Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
");
?>
<div class="main-title no-border clearfix">
	<h1>Export: Team Performance</h1>
</div>
<div class="flat_area">
	<div class="grid_16 relative">			
		<div class="search-form">
			<?php $this->renderPartial('_search_team', array('from_date' => $from_date, 'to_date' => $to_date,  'mySqlFromDate' => $mySqlFromDate, 'mySqlToDate' => $mySqlToDate,  'show_deleted' => $show_deleted, 'leader_user_id' => $leader_user_id)); ?>
		</div>
		<?php if (isset($dataProvider)): ?>
			<?php
			$form = $this->beginWidget('GxActiveForm', array(
				'id' => 'export-action-form',
				'method' => 'get'
			));
			?>
			<div id="ps-records-to-export-index" class="section">
				<div class="block">
					<h2><?php echo $dataProvider->getTotalItemCount(); ?> Records Found</h2>
					<?php
					$this->widget('PsGridView', array(
						'id' => 'export-records-index-grid',
						'dataProvider' => $dataProvider,
//						'mergeColumns' => $mergeColumns,
						'template' => '{items}{pager}{pagesize}',
						'htmlOptions' => array(
							'class' => 'grid-view grey'
						),
						'pagerCssClass' => 'pager float-right',
						'pagesizeCssClass' => 'pager-pagesize float-right',
						'columns' => $columns
					));
					?>
				</div>
			</div>
			<div id="bulk-actions-form">
				<?php echo GxHtml::submitButton(Yii::t('app', 'Export'), array('class' => 'blue', 'name' => 'action')); ?>
			</div>
			<?php $this->endWidget(); ?>
		</div>
	</div>
<?php endif; ?>